/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package boundless.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author hendrikdekock
 */
@Entity
@Table(name = "PLAYERSANDPOSITIONSBYTEAM")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Playersandpositionsbyteam.findAll", query = "SELECT p FROM Playersandpositionsbyteam p"),
    @NamedQuery(name = "Playersandpositionsbyteam.findByName", query = "SELECT p FROM Playersandpositionsbyteam p WHERE p.name = :name"),
    @NamedQuery(name = "Playersandpositionsbyteam.findById", query = "SELECT p FROM Playersandpositionsbyteam p WHERE p.viewPK.playerid = :id"),
    @NamedQuery(name = "Playersandpositionsbyteam.findByPlayposition", query = "SELECT p FROM Playersandpositionsbyteam p WHERE p.playposition = :playposition"),
    @NamedQuery(name = "Playersandpositionsbyteam.findByTeamid", query = "SELECT p FROM Playersandpositionsbyteam p WHERE p.viewPK.teamid = :teamid"),
    @NamedQuery(name = "Playersandpositionsbyteam.findByActive", query = "SELECT p FROM Playersandpositionsbyteam p WHERE p.active = :active")})
public class Playersandpositionsbyteam implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected PlayersandpositionsbyteamPK viewPK;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 80)
    @Column(name = "NAME")
    private String name;
    @Basic(optional = false)
    @NotNull
    @Column(name = "PLAYPOSITION")
    private int playposition;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ACTIVE")
    private short active;

    public Playersandpositionsbyteam() {
    }
    

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return viewPK.getId();
    }

    public void setId(int id) {
        viewPK.setId(id);
    }

    public int getPlayposition() {
        return playposition;
    }

    public void setPlayposition(int playposition) {
        this.playposition = playposition;
    }

    public int getTeamid() {
        return viewPK.getTeamid();
    }

    public void setTeamid(int teamid) {
        viewPK.setTeamid(teamid);
    }

    public short getActive() {
        return active;
    }

    public void setActive(short active) {
        this.active = active;
    }
    
}
